<template>
  <div>
    <div class="row justify-start line-height-32px bg-panda-dark-dark items-center q-pl-sm">
      <span class="panda-right-info-toogle-button active" @click="toggle_showrightdetail">
        <q-tooltip anchor="bottom middle" self="top middle">{{rightdetail_tooltip}}</q-tooltip>

        <span class="panda-right-info-toogle-button-inner"></span>
      </span>
    </div>
    <div class="bg-panda-base-light q-px-md q-pt-sm q-pb-md">
      <div class="row q-mb-lg">
        <div class="col">
          <!-- <span
            class="line-height-32px"
          >{{filter_value_to_label("match_level",right_detail_obj.tournamentLevel)}}</span> -->
        </div>
        <div class="col">
          <div class="float-right">
            <q-btn class="panda-btn-light-dense" @click="show_match_edit(right_detail_obj)">编辑管理</q-btn>
          </div>
        </div>
      </div>
      <div class="text-center bg-panda-base-light" style="height:55px;">
        <img
          :src="compute_image_src(right_detail_obj.picUrl)  "
          class="border-radius-10px"
          alt
          width="50px"
          height="50px"
        />
      </div>
      <div class="text-center">{{compute_table_item_show_name(right_detail_obj,'','tournamentName')}}</div>
      <div class="text-center" style="height:20px;">{{right_detail_obj.tournamentManagerId}}</div>
    </div>

    <q-scroll-area class :style="compute_scroll_area_style()">
      <all-language-name :alllanguage_arr="alllanguage_arr"></all-language-name>
    </q-scroll-area>
  </div>
</template>
<style lang="stylus" scoped>
.right-label-icon-like {
  height: 18px;
  width: 18px;
  line-height: 18px;
}
</style>


<script>
import { match_resource_tabledata } from "src/mock/match/index.js";
import constantmixin from "src/mixins/constant/index.js";
import baseconfigmixin from "src/mixins/module/baseconfigmixin.js";
import allLanguageName from "src/components/info/allLanguageName.vue";
import alllanguage from "src/mixins/language/alllanguage.js";
import rightinfomixin from "src/mixins/layout/rightinfo.js";
import routerCache from "src/mixins/routerCache/routerCache.js";
export default {
  mixins: [...constantmixin, baseconfigmixin, alllanguage, routerCache, rightinfomixin],
  components: {
    allLanguageName
  },
  data() {
    return {
      alllanguage_arr: []
    };
  },
  props: {
    right_detail_obj: ""
  },
  created() {
    this.init_alllanguage_arr();
  },
  watch: {
    right_detail_obj() {
      this.init_alllanguage_arr();
    }
  },
  methods: {
    show_match_edit(item) {
      this.$emit("toedit",item);
    },

    init_alllanguage_arr() {
      let arr = this.all_language_rebase(
        this.right_detail_obj,
        "tournamentName",
        "dataSourceCode",
        "relatedTour"
      );
      console.log(
        "let arr= this. all_language_rebase(this.right_detail_obj, 'tournamentName', 'dataSourceCode', 'relatedTour')"
      );
      console.log(arr);
      this.alllanguage_arr = arr;
    },

    compute_scroll_area_style() {
      let wh = this.window_size_info.height;
      let wc = wh - 36 - 30 - 32 - 200;
      return `height:${wc}px; max-height:${wc}px;`;
    }
  }
};
</script>
